<?php
namespace app\admin\validate;

use think\Validate;

class Cate extends Validate
{
    protected $rule =   [
        'catename'  => 'require|max:25|unique:cate',
            
    ];

    protected $message  =   [
        'catename.require' => '栏目名称不得为空！',        
        'catename.max'     => '栏目名称最多不能超过25个字符',
        'catename.unique'  => '栏目名称不得重复！', 

    ];

    protected $scene = [
        'edit'  =>  ['catename'],
        'add' =>['catename'],
    ];

}